package STUDENT.TRANVIETHOANG.OOPs.Songaytrongthang;

public class Models {
	public int TinhNgay(NgayThang obj){
		int kq = 0;
		if(obj.getThang()==4||obj.getThang()==6||obj.getThang()==9||obj.getThang()==11){kq=30;}
		if(obj.getThang()==3||obj.getThang()==5||obj.getThang()==7||obj.getThang()==12){kq=31;}
		if(obj.getNam()%400==0 ||obj.getNam()%4==0&&obj.getNam()%100!=0){kq=29;}
		return kq;
	}
}
